Skip to content

Fix flakey integ test by adding params#7146

Merged
RanVaknin merged 1 commit into
masterfrom
rvaknin/fix-cloudwatch-alarms-flakey-integ-test
Jul 20, 2026
Merged

Fix flakey integ test by adding params#7146
RanVaknin merged 1 commit into
masterfrom
rvaknin/fix-cloudwatch-alarms-flakey-integ-test

Conversation

@RanVaknin

@RanVaknin RanVaknin commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Context

testExceptionHandling integ test in the Cloudwatch test package was flakey because the service was returning a non deterministic exception. We expected it to return MissingParameter exception but it sometimes returned InvalidParameterCombination exception instead.

I was able to reproduce it by running test case repeatedly 100 times, seeing the following:
79/100 MissingParameter
21/100 InvalidParameterCombination

Fix

The fix adds all the other required fields, except for MetricName. Resulted in deterministic 100/100 MissingParameter exception.

@RanVaknin
RanVaknin marked this pull request as ready for review July 14, 2026 21:58
@RanVaknin
RanVaknin requested a review from a team as a code owner July 14, 2026 21:58
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static software.amazon.awssdk.testutils.service.AwsTestBase.isValidSdkServiceException;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.core.CompressionConfiguration;
import software.amazon.awssdk.core.SdkGlobalTime;
import software.amazon.awssdk.core.exception.SdkServiceException;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

@RanVaknin
RanVaknin added this pull request to the merge queue Jul 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Jul 17, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@RanVaknin
RanVaknin added this pull request to the merge queue Jul 20, 2026
Merged via the queue into master with commit 84ccac9 Jul 20, 2026
17 checks passed
@github-actions

Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 20, 2026
@RanVaknin
RanVaknin deleted the rvaknin/fix-cloudwatch-alarms-flakey-integ-test branch July 20, 2026 20:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants